function [fea,gnd] = loadCOIL20(output)
    k = 1;
    for i=1:20
        face_folder = './';
        face_file = dir([face_folder 'obj' num2str(i) '__*.png'] );
    
        for j=1:length(face_file) 
            fea(k,:) = loadImage([face_folder face_file(j).name]);
            gnd(k) = i;
            k = k+1;
        end
    end
    gnd = gnd(:);

    save(output, 'fea', 'gnd');
end

function a = loadImage(filename)
    display([filename '']);
    a = imread(filename);
    a = histeq(a, 64);
    a = double(a(:)') / 255;
end
